<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center huishoujil_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub huishoujil_fd0_0'>
          <view class='flex flex-wrap align-center huishoujil_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  huishoujil_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='huishoujil_fd0_0_c1_c0'>回收记录</text>
          </view>
          <view class='flex flex-wrap align-center justify-end huishoujil_fd0_0_c0'>
            <!-- <text class='fu-iconfont2'>&#xe756;</text> -->
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <view class='flex flex-wrap align-center justify-end huishoujil_fd0_0_c0s' @click.stop="openpoup">
        <text class='fu-iconfont2'>&#xe756;</text>
      </view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout huishoujil_flex_1">
        <template v-for='(item,key0) in dataList'>
          <view class='flex flex-direction align-stretch huishoujil_fd1_0' :key='key0'>
            <view class='flex flex-wrap align-center justify-between flex-sub huishoujil_fd1_0_c0'>
              <view class='flex flex-wrap align-center'>
                <text>回收时间：</text>
                <text>{{item.time}}</text>
              </view>
              <!-- <view class='flex flex-wrap align-center'>
                <text class='huishoujil_fd1_0_c0_c1_c0'>查看详情</text>
              </view> -->
            </view>
            <!--     <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>型号</text>
              <text class='huishoujil_fd1_0_c1_c1'>{{item.type_no}}</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>品牌</text>
              <text class='huishoujil_fd1_0_c1_c1'>{{item.brand}}</text>
            </view> -->
            <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>种类</text>
              <text class='huishoujil_fd1_0_c1_c1'>{{item.cate}}</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>估计重量</text>
              <text class='huishoujil_fd1_0_c1_c1'>{{item.guji_wghit}}吨</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>数量</text>
              <text class='huishoujil_fd1_0_c1_c1'>{{item.number}}</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>重量</text>
              <text class='huishoujil_fd1_0_c1_c1'>{{item.weghit}}KG</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='huishoujil_fd1_0_c1_c0'>回收师傅</text>
              <view class="flex align-center">
                <image class="avart" :src="item.user_info.avatar" mode="aspectFill"></image>
                <text class='huishoujil_fd1_0_c1_c1'>{{item.user_nickname}}</text>
              </view>

            </view>
          </view>
        </template>
        <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
          :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---flex布局flex布局结束-->


    </view>
    <!-- 日历弹框 start -->
    <fu-popup v-model="isShow" mode="center" :mask-close-able="true" @close="closePopup">
      <view class="calendar-box">
        <fu-calendar @change="change" active-bg-color="#10337e" range-bg-color="#16583d1a" :future="true" start-text=""
          end-text="" mode="range" :isDefaultDay="false" :start-time="start_data" :end-time="end_data"></fu-calendar>
      </view>
    </fu-popup>
    <!-- 日历弹框 end -->
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        isShow: false,
        "start_data": "",
        "end_data": "",
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "dataList": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getii65d1779f0b5b5Func()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      openpoup() {
        this.isShow = true;
      },
      change(value) {
        if (value.isInit) return;
        this.end_data = value.end
        this.start_data = value.start
        this.isShow = false;
        console.log(value)
        this.getii65d1779f0b5b5Func()
      },
      closePopup() {
        this.isShow = false;
        this.getii65d1779f0b5b5Func()
      },
      //师傅端订单列表
      getii65d1779f0b5b5Func() {
        let create_time = ''
        if (this.end_data) {
          create_time = this.start_data + ',' + this.end_data
        }
        this.minixPagingListsApi = global.apiUrls.post65d1bb37cf25e;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          order_status: '3',
          create_time: create_time
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .calendar-box {
    background: #FFF;
    border-radius: 16rpx;
    width: 640rpx;
    padding: 0 24rpx;
    border: 1px solid transparent;
  }

  .avart {
    width: 50rpx;
    height: 50rpx;
    border-radius: 50%;
    margin-right: 20rpx;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .huishoujil_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .huishoujil_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .huishoujil_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .huishoujil_fd0_0_c0 {
    width: 120rpx;
  }

  .huishoujil_fd0_0_c0s {
    width: 701rpx;
    margin: 32rpx auto 0 auto;
  }

  .huishoujil_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .huishoujil_flex_1 {
    background: #F8F8F8;
    background-size: 100% auto;
    height: 100vh;
  }

  .huishoujil_fd1_0_c1_c1 {
    color: #333;
    font-size: 26rpx;
  }

  .huishoujil_fd1_0_c1_c0 {
    color: var(--benbenFontColor2);
    font-size: 26rpx;
    padding: 24rpx;
  }

  .huishoujil_fd1_0_c0_c1_c0 {
    font-size: 28rpx;
    color: rgba(16, 51, 126, 1);
  }

  .huishoujil_fd1_0_c0 {
    background: linear-gradient(90deg, #D9E4FF 0%, rgba(217, 228, 255, 0) 100%);
    border-radius: 16rpx 16rpx 0rpx 0rpx;
    width: 686rpx;
    font-size: 28rpx;
    padding: 16rpx 24rpx 16rpx 24rpx;
  }

  .huishoujil_fd1_0 {
    background: #FFF;
    width: 686rpx;
    margin: 24rpx auto 0rpx auto;
    background-size: 100% auto;
  }
</style>
